package com.nbjtjc.safe.mapper.edu;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.nbjtjc.safe.model.edu.EduCertificate;
import com.nbjtjc.safe.model.edu.EduCertificateRetrain;
import com.nbjtjc.safe.model.edu.EduRequirementInvestigation;
import com.nbjtjc.util.MyMapper;

@Mapper
public interface EduCertificateMapper extends MyMapper<EduCertificate> {
	//按条件查出列表
	List<EduCertificate> search(@Param("ec")EduCertificate eduCertificate);
	
	List<EduCertificate> searchDetail(@Param("ec")EduCertificate eduCertificate);

	//选中一个持证培训查看
	EduCertificate show(@Param("id")int id);

	int batchRetrain(@Param("ec") EduCertificate eduCertificate );
	
    @Select("SELECT DISTINCT DATE_FORMAT(get_date,'%Y') AS 'year' FROM  edu_certificate WHERE company_id = #{companyId} and get_date IS NOT NULL")
    List<String> findYear(@Param("companyId")Integer companyId);
    
}